3.3.63 \(\int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx\) [263]
Optimal. Leaf size=186 \[ \frac {2 b \left (a b c-2 a^2 d+b^2 d\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2} (b c-a d)^2 f}+\frac {2 d^2 \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d} (b c-a d)^2 f}-\frac {b^2 \sin (e+f x)}{\left (a^2-b^2\right ) (b c-a d) f (b+a \cos (e+f x))} \]
[Out]
2*b*(-2*a^2*d+a*b*c+b^2*d)*arctanh((a-b)^(1/2)*tan(1/2*f*x+1/2*e)/(a+b)^(1/2))/(a-b)^(3/2)/(a+b)^(3/2)/(-a*d+b
*c)^2/f-b^2*sin(f*x+e)/(a^2-b^2)/(-a*d+b*c)/f/(b+a*cos(f*x+e))+2*d^2*arctanh((c-d)^(1/2)*tan(1/2*f*x+1/2*e)/(c
+d)^(1/2))/(-a*d+b*c)^2/f/(c-d)^(1/2)/(c+d)^(1/2)
________________________________________________________________________________________
Rubi [A]
time = 0.42, antiderivative size = 186, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {4073, 3135,
3080, 2738, 214} \begin {gather*} -\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}+\frac {2 b \left (-2 a^2 d+a b c+b^2 d\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{f (a-b)^{3/2} (a+b)^{3/2} (b c-a d)^2}+\frac {2 d^2 \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{f \sqrt {c-d} \sqrt {c+d} (b c-a d)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[Sec[e + f*x]/((a + b*Sec[e + f*x])^2*(c + d*Sec[e + f*x])),x]
[Out]
(2*b*(a*b*c - 2*a^2*d + b^2*d)*ArcTanh[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqrt[a + b]])/((a - b)^(3/2)*(a + b)^(3/
2)*(b*c - a*d)^2*f) + (2*d^2*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(Sqrt[c - d]*Sqrt[c + d]*(b*
c - a*d)^2*f) - (b^2*Sin[e + f*x])/((a^2 - b^2)*(b*c - a*d)*f*(b + a*Cos[e + f*x]))
Rule 214
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 3080
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
&& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Rule 3135
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*s
in[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 + a^2*C))*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((c
+ d*Sin[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2))), x] + Dist[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)),
Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[a*(m + 1)*(b*c - a*d)*(A + C) + d*(A*b^2 + a^2*C
)*(m + n + 2) - (c*(A*b^2 + a^2*C) + b*(m + 1)*(b*c - a*d)*(A + C))*Sin[e + f*x] - d*(A*b^2 + a^2*C)*(m + n +
3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2,
0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2*n] && L
tQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Rule 4073
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[1/g^(m + n), Int[(g*Csc[e + f*x])^(m + n + p)*(b + a*Sin[e + f*x])^m*(d
+ c*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b*c - a*d, 0] && IntegerQ[m] && Inte
gerQ[n]
Rubi steps
\begin {align*} \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx &=\int \frac {\cos ^2(e+f x)}{(b+a \cos (e+f x))^2 (d+c \cos (e+f x))} \, dx\\ &=-\frac {b^2 \sin (e+f x)}{\left (a^2-b^2\right ) (b c-a d) f (b+a \cos (e+f x))}-\frac {\int \frac {-a b d-\left (a b c-a^2 d+b^2 d\right ) \cos (e+f x)}{(b+a \cos (e+f x)) (d+c \cos (e+f x))} \, dx}{\left (a^2-b^2\right ) (b c-a d)}\\ &=-\frac {b^2 \sin (e+f x)}{\left (a^2-b^2\right ) (b c-a d) f (b+a \cos (e+f x))}+\frac {d^2 \int \frac {1}{d+c \cos (e+f x)} \, dx}{(b c-a d)^2}+\frac {\left (b \left (a b c-2 a^2 d+b^2 d\right )\right ) \int \frac {1}{b+a \cos (e+f x)} \, dx}{\left (a^2-b^2\right ) (b c-a d)^2}\\ &=-\frac {b^2 \sin (e+f x)}{\left (a^2-b^2\right ) (b c-a d) f (b+a \cos (e+f x))}+\frac {\left (2 d^2\right ) \text {Subst}\left (\int \frac {1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{(b c-a d)^2 f}+\frac {\left (2 b \left (a b c-2 a^2 d+b^2 d\right )\right ) \text {Subst}\left (\int \frac {1}{a+b+(-a+b) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{\left (a^2-b^2\right ) (b c-a d)^2 f}\\ &=\frac {2 b \left (a b c-2 a^2 d+b^2 d\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2} (b c-a d)^2 f}+\frac {2 d^2 \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d} (b c-a d)^2 f}-\frac {b^2 \sin (e+f x)}{\left (a^2-b^2\right ) (b c-a d) f (b+a \cos (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.03, size = 176, normalized size = 0.95 \begin {gather*} \frac {\frac {2 b \left (a b c-2 a^2 d+b^2 d\right ) \tanh ^{-1}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {2 \left (a^2-b^2\right ) d^2 \tanh ^{-1}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\sqrt {c^2-d^2}}+\frac {b^2 (b c-a d) \sin (e+f x)}{b+a \cos (e+f x)}}{(-a+b) (a+b) (b c-a d)^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[Sec[e + f*x]/((a + b*Sec[e + f*x])^2*(c + d*Sec[e + f*x])),x]
[Out]
((2*b*(a*b*c - 2*a^2*d + b^2*d)*ArcTanh[((-a + b)*Tan[(e + f*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] + (2*(a^
2 - b^2)*d^2*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/Sqrt[c^2 - d^2] + (b^2*(b*c - a*d)*Sin[e +
f*x])/(b + a*Cos[e + f*x]))/((-a + b)*(a + b)*(b*c - a*d)^2*f)
________________________________________________________________________________________
Maple [A]
time = 1.20, size = 210, normalized size = 1.13
| | |
method |
result |
size |
| | |
derivativedivides |
\(\frac {\frac {2 d^{2} \arctanh \left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a d -b c \right )^{2} \sqrt {\left (c +d \right ) \left (c -d \right )}}+\frac {2 b \left (-\frac {b \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-a -b \right )}-\frac {\left (2 a^{2} d -a b c -d \,b^{2}\right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a d -b c \right )^{2}}}{f}\) |
\(210\) |
default |
\(\frac {\frac {2 d^{2} \arctanh \left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a d -b c \right )^{2} \sqrt {\left (c +d \right ) \left (c -d \right )}}+\frac {2 b \left (-\frac {b \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-a -b \right )}-\frac {\left (2 a^{2} d -a b c -d \,b^{2}\right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a d -b c \right )^{2}}}{f}\) |
\(210\) |
risch |
\(\frac {2 i b^{2} \left (b \,{\mathrm e}^{i \left (f x +e \right )}+a \right )}{a \left (a^{2}-b^{2}\right ) \left (a d -b c \right ) f \left (a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{i \left (f x +e \right )}+a \right )}+\frac {2 b \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) a^{2} d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}-\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) a c}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}-\frac {2 b \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) a^{2} d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}+\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) a c}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right ) d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right )}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} f}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right )}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} f}\) |
\(810\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x,method=_RETURNVERBOSE)
[Out]
1/f*(2*d^2/(a*d-b*c)^2/((c+d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))+2*b/(a*d-b*c)
^2*(-b*(a*d-b*c)/(a^2-b^2)*tan(1/2*f*x+1/2*e)/(a*tan(1/2*f*x+1/2*e)^2-b*tan(1/2*f*x+1/2*e)^2-a-b)-(2*a^2*d-a*b
*c-b^2*d)/(a+b)/(a-b)/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*f*x+1/2*e)/((a+b)*(a-b))^(1/2))))
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?`
for more de
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 663 vs.
\(2 (172) = 344\).
time = 166.85, size = 2900, normalized size = 15.59 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x, algorithm="fricas")
[Out]
[-1/2*((a*b^3*c^3 - a*b^3*c*d^2 - (2*a^2*b^2 - b^4)*c^2*d + (2*a^2*b^2 - b^4)*d^3 + (a^2*b^2*c^3 - a^2*b^2*c*d
^2 - (2*a^3*b - a*b^3)*c^2*d + (2*a^3*b - a*b^3)*d^3)*cos(f*x + e))*sqrt(a^2 - b^2)*log((2*a*b*cos(f*x + e) -
(a^2 - 2*b^2)*cos(f*x + e)^2 - 2*sqrt(a^2 - b^2)*(b*cos(f*x + e) + a)*sin(f*x + e) + 2*a^2 - b^2)/(a^2*cos(f*x
+ e)^2 + 2*a*b*cos(f*x + e) + b^2)) - ((a^5 - 2*a^3*b^2 + a*b^4)*d^2*cos(f*x + e) + (a^4*b - 2*a^2*b^3 + b^5)
*d^2)*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x +
e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*((a^2*b^3 - b^5)*c^3
- (a^3*b^2 - a*b^4)*c^2*d - (a^2*b^3 - b^5)*c*d^2 + (a^3*b^2 - a*b^4)*d^3)*sin(f*x + e))/(((a^5*b^2 - 2*a^3*b^
4 + a*b^6)*c^4 - 2*(a^6*b - 2*a^4*b^3 + a^2*b^5)*c^3*d + (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*c^2*d^2 + 2*(a^
6*b - 2*a^4*b^3 + a^2*b^5)*c*d^3 - (a^7 - 2*a^5*b^2 + a^3*b^4)*d^4)*f*cos(f*x + e) + ((a^4*b^3 - 2*a^2*b^5 + b
^7)*c^4 - 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^3*d + (a^6*b - 3*a^4*b^3 + 3*a^2*b^5 - b^7)*c^2*d^2 + 2*(a^5*b^2 -
2*a^3*b^4 + a*b^6)*c*d^3 - (a^6*b - 2*a^4*b^3 + a^2*b^5)*d^4)*f), 1/2*(2*((a^5 - 2*a^3*b^2 + a*b^4)*d^2*cos(f
*x + e) + (a^4*b - 2*a^2*b^3 + b^5)*d^2)*sqrt(-c^2 + d^2)*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2
- d^2)*sin(f*x + e))) - (a*b^3*c^3 - a*b^3*c*d^2 - (2*a^2*b^2 - b^4)*c^2*d + (2*a^2*b^2 - b^4)*d^3 + (a^2*b^2*
c^3 - a^2*b^2*c*d^2 - (2*a^3*b - a*b^3)*c^2*d + (2*a^3*b - a*b^3)*d^3)*cos(f*x + e))*sqrt(a^2 - b^2)*log((2*a*
b*cos(f*x + e) - (a^2 - 2*b^2)*cos(f*x + e)^2 - 2*sqrt(a^2 - b^2)*(b*cos(f*x + e) + a)*sin(f*x + e) + 2*a^2 -
b^2)/(a^2*cos(f*x + e)^2 + 2*a*b*cos(f*x + e) + b^2)) - 2*((a^2*b^3 - b^5)*c^3 - (a^3*b^2 - a*b^4)*c^2*d - (a^
2*b^3 - b^5)*c*d^2 + (a^3*b^2 - a*b^4)*d^3)*sin(f*x + e))/(((a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^4 - 2*(a^6*b - 2*a
^4*b^3 + a^2*b^5)*c^3*d + (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*c^2*d^2 + 2*(a^6*b - 2*a^4*b^3 + a^2*b^5)*c*d^
3 - (a^7 - 2*a^5*b^2 + a^3*b^4)*d^4)*f*cos(f*x + e) + ((a^4*b^3 - 2*a^2*b^5 + b^7)*c^4 - 2*(a^5*b^2 - 2*a^3*b^
4 + a*b^6)*c^3*d + (a^6*b - 3*a^4*b^3 + 3*a^2*b^5 - b^7)*c^2*d^2 + 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c*d^3 - (a^
6*b - 2*a^4*b^3 + a^2*b^5)*d^4)*f), 1/2*(2*(a*b^3*c^3 - a*b^3*c*d^2 - (2*a^2*b^2 - b^4)*c^2*d + (2*a^2*b^2 - b
^4)*d^3 + (a^2*b^2*c^3 - a^2*b^2*c*d^2 - (2*a^3*b - a*b^3)*c^2*d + (2*a^3*b - a*b^3)*d^3)*cos(f*x + e))*sqrt(-
a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(f*x + e) + a)/((a^2 - b^2)*sin(f*x + e))) + ((a^5 - 2*a^3*b^2 + a*b
^4)*d^2*cos(f*x + e) + (a^4*b - 2*a^2*b^3 + b^5)*d^2)*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*
cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*
d*cos(f*x + e) + d^2)) - 2*((a^2*b^3 - b^5)*c^3 - (a^3*b^2 - a*b^4)*c^2*d - (a^2*b^3 - b^5)*c*d^2 + (a^3*b^2 -
a*b^4)*d^3)*sin(f*x + e))/(((a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^4 - 2*(a^6*b - 2*a^4*b^3 + a^2*b^5)*c^3*d + (a^7
- 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*c^2*d^2 + 2*(a^6*b - 2*a^4*b^3 + a^2*b^5)*c*d^3 - (a^7 - 2*a^5*b^2 + a^3*b^4)
*d^4)*f*cos(f*x + e) + ((a^4*b^3 - 2*a^2*b^5 + b^7)*c^4 - 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^3*d + (a^6*b - 3*a
^4*b^3 + 3*a^2*b^5 - b^7)*c^2*d^2 + 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c*d^3 - (a^6*b - 2*a^4*b^3 + a^2*b^5)*d^4)
*f), ((a*b^3*c^3 - a*b^3*c*d^2 - (2*a^2*b^2 - b^4)*c^2*d + (2*a^2*b^2 - b^4)*d^3 + (a^2*b^2*c^3 - a^2*b^2*c*d^
2 - (2*a^3*b - a*b^3)*c^2*d + (2*a^3*b - a*b^3)*d^3)*cos(f*x + e))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(
b*cos(f*x + e) + a)/((a^2 - b^2)*sin(f*x + e))) + ((a^5 - 2*a^3*b^2 + a*b^4)*d^2*cos(f*x + e) + (a^4*b - 2*a^2
*b^3 + b^5)*d^2)*sqrt(-c^2 + d^2)*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) -
((a^2*b^3 - b^5)*c^3 - (a^3*b^2 - a*b^4)*c^2*d - (a^2*b^3 - b^5)*c*d^2 + (a^3*b^2 - a*b^4)*d^3)*sin(f*x + e))/
(((a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^4 - 2*(a^6*b - 2*a^4*b^3 + a^2*b^5)*c^3*d + (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a
*b^6)*c^2*d^2 + 2*(a^6*b - 2*a^4*b^3 + a^2*b^5)*c*d^3 - (a^7 - 2*a^5*b^2 + a^3*b^4)*d^4)*f*cos(f*x + e) + ((a^
4*b^3 - 2*a^2*b^5 + b^7)*c^4 - 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^3*d + (a^6*b - 3*a^4*b^3 + 3*a^2*b^5 - b^7)*c
^2*d^2 + 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c*d^3 - (a^6*b - 2*a^4*b^3 + a^2*b^5)*d^4)*f)]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec {\left (e + f x \right )}}{\left (a + b \sec {\left (e + f x \right )}\right )^{2} \left (c + d \sec {\left (e + f x \right )}\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))**2/(c+d*sec(f*x+e)),x)
[Out]
Integral(sec(e + f*x)/((a + b*sec(e + f*x))**2*(c + d*sec(e + f*x))), x)
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 330, normalized size = 1.77 \begin {gather*} \frac {2 \, {\left (\frac {{\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, c + 2 \, d\right ) + \arctan \left (-\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )} d^{2}}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c^{2} + d^{2}}} + \frac {b^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a^{2} b c - b^{3} c - a^{3} d + a b^{2} d\right )} {\left (a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a - b\right )}} - \frac {{\left (a b^{2} c - 2 \, a^{2} b d + b^{3} d\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{2} b^{2} c^{2} - b^{4} c^{2} - 2 \, a^{3} b c d + 2 \, a b^{3} c d + a^{4} d^{2} - a^{2} b^{2} d^{2}\right )} \sqrt {-a^{2} + b^{2}}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x, algorithm="giac")
[Out]
2*((pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(-2*c + 2*d) + arctan(-(c*tan(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e
))/sqrt(-c^2 + d^2)))*d^2/((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-c^2 + d^2)) + b^2*tan(1/2*f*x + 1/2*e)/((a^2*
b*c - b^3*c - a^3*d + a*b^2*d)*(a*tan(1/2*f*x + 1/2*e)^2 - b*tan(1/2*f*x + 1/2*e)^2 - a - b)) - (a*b^2*c - 2*a
^2*b*d + b^3*d)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*f*x + 1/2*e) - b*tan(1/2*
f*x + 1/2*e))/sqrt(-a^2 + b^2)))/((a^2*b^2*c^2 - b^4*c^2 - 2*a^3*b*c*d + 2*a*b^3*c*d + a^4*d^2 - a^2*b^2*d^2)*
sqrt(-a^2 + b^2)))/f
________________________________________________________________________________________
Mupad [B]
time = 15.56, size = 2500, normalized size = 13.44 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(1/(cos(e + f*x)*(a + b/cos(e + f*x))^2*(c + d/cos(e + f*x))),x)
[Out]
(d^2*atan(((d^2*(c^2 - d^2)^(1/2)*((32*tan(e/2 + (f*x)/2)*(a^6*d^5 + 2*b^6*d^5 - 2*a*b^5*d^5 - 2*a^5*b*d^5 - a
^6*c*d^4 - 4*b^6*c*d^4 - a^2*b^4*c^5 - 5*a^2*b^4*d^5 + 4*a^3*b^3*d^5 + 3*a^4*b^2*d^5 + 3*b^6*c^2*d^3 - b^6*c^3
*d^2 - 6*a*b^5*c^2*d^3 + 6*a*b^5*c^3*d^2 + 13*a^2*b^4*c*d^4 + 3*a^2*b^4*c^4*d - 8*a^3*b^3*c*d^4 + 4*a^3*b^3*c^
4*d - 11*a^4*b^2*c*d^4 - 11*a^2*b^4*c^2*d^3 + a^2*b^4*c^3*d^2 + 12*a^3*b^3*c^2*d^3 - 12*a^3*b^3*c^3*d^2 + 12*a
^4*b^2*c^2*d^3 - 4*a^4*b^2*c^3*d^2 + 4*a*b^5*c*d^4 - 2*a*b^5*c^4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b^6*c^3*d^4 - 31*a^3*b^6*c^4*d^3 + 7*a^3*b^6*c^5*d^2 - 21*a^4*b^5*c^2*d^5 + 34*a^4
*b^5*c^3*d^4 + 4*a^4*b^5*c^4*d^3 - 21*a^4*b^5*c^5*d^2 - 16*a^5*b^4*c^2*d^5 - 21*a^5*b^4*c^3*d^4 + 33*a^5*b^4*c
^4*d^3 - 4*a^5*b^4*c^5*d^2 + 23*a^6*b^3*c^2*d^5...
________________________________________________________________________________________